Fix CLI typecheck failures and missing devDependencies - #1200
Open
nordicnode wants to merge 1 commit into
Open
Conversation
Contributor
|
Good, minimal, well-scoped fix. Adding A few things worth double-checking before porting:
Overall: correct diagnosis, small blast radius, in-scope files only. Worth a maintainer's few minutes to confirm the runtime-vs-dev dependency placement for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem & Context
Running TypeScript typechecking on the CLI package (
bun x tsc --noEmit -p clior workspacetsc --build) failed with 10 compilation errors across 10 files:TS2307: Cannot find module 'tar' or its corresponding type declarationsincli/src/__tests__/release/wrapper-safety.test.ts:265. Furthermore,cli/release-core/launcher.js:12requirestar, and runningbun test cli/src/__tests__/release/wrapper-safety.test.tsfailed withCannot find module 'tar'becausetarwas not declared incli/package.jsondevDependencies.cli/src/components/...(e.g.grid-layout.test.tsx,message-block.completion.test.tsx,render-ui.test.tsx) failed withTS7016: Could not find a declaration file for module 'react-dom/server'because@types/react-domwas omitted fromcli/package.jsondevDependencies despitereact-dombeing declared.Changes Made
"@types/react-dom": "19.2.3"tocli/package.jsondevDependencies(aligning with rootpackage.jsonReact 19 overrides)."tar": "^7.0.0"tocli/package.jsondevDependencies(matchingcli/release/package.json)."@types/tar": "^6.1.13"tocli/package.jsondevDependenciesto provide type declarations fortar.bun.lockaccordingly.Architecture & Conventions Conformance
common/src/types/contracts/, no module monkey patching)terminalCommandBroker(no directspawnor TUI-process bypass)getCliEnv()for CLI,getSdkEnv()for SDK, no forbiddengetProcessEnv()imports)IS_FREEBUFFpreserved, no paid features introduced)import typeused for types)Scope Verification
cli/package.json,bun.lockweb/,freebuff/web/,packages/internal/,packages/billing/,packages/bigquery/, orpackages/build-tools/Testing & Verification
bun x tsc --noEmit -p clipassed with 0 errors (was 10 errors).bun test cli/src/__tests__/release/wrapper-safety.test.tspassed 17/17 tests (was 3 failures).bun run build:sdkpassed cleanly.bun run build:freebuffpassed cleanly.bun cli/scripts/smoke-binary.ts cli/bin/freebuffpassed cleanly.